package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class OldOrNewValuesAliasList {

    private int beginIndex;
    private int endIndex;
    private List<OldOrNewValuesAlias> oldOrNewValuesAliasList;

    public OldOrNewValuesAliasList(List<OldOrNewValuesAlias> oldOrNewValuesAliasList) {
        this.beginIndex = oldOrNewValuesAliasList.get(0).getBeginIndex();
        this.endIndex = oldOrNewValuesAliasList.get(oldOrNewValuesAliasList.size() - 1).getEndIndex();
        this.oldOrNewValuesAliasList = oldOrNewValuesAliasList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return oldOrNewValuesAliasList.size();
    }

    public OldOrNewValuesAlias get(int index) {
        return oldOrNewValuesAliasList.get(index);
    }

}
